Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ADO tests with GitHub actions #2855

Merged
merged 42 commits into from
Jun 19, 2024
Merged

Conversation

davidmrdavid
Copy link
Contributor

@davidmrdavid davidmrdavid commented Jun 18, 2024

As part of our 1ES migration - we're replacing our ADO unit, integration, and end to tests with GitHub actions that use Azurite as a backing Azure Storage store. This PR does just that: it creates 3 new GitHub actions - one for the analyzer tests, one for the E2E tests, and another for the remaining tests.

Finally, this PR also resolve a myriad of build warnings, for clean up sake.

@davidmrdavid davidmrdavid changed the title [WIP] Add tests as GH action Replace ADO tests with GitHub actions Jun 19, 2024
@@ -10,7 +10,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.30" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="2.3.0" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inherited from WebJobs project

Comment on lines +257 to +258
internal IHost InnerHost { get; private set; }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this resolves a build warning

timeout = Debugger.IsAttached ? TimeSpan.FromMinutes(5) : TimeSpan.FromSeconds(30);
timeout = Debugger.IsAttached ? TimeSpan.FromMinutes(5) : TimeSpan.FromMinutes(1);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub actions + Azurite seems to run tests more slowly, so I added more buffer time

Comment on lines +749 to +751
// add a minute wait to ensure logs are fully written
await Task.Delay(TimeSpan.FromMinutes(1));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more buffer time to account for GH action slowness

{
if (parent.Id == some.Context.Operation.ParentId)
{
Console.WriteLine("match");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

writing to console in GitHub actions is flakey and can cause runtime errors. So I removed this, which was only there for debugging purposes

@davidmrdavid davidmrdavid marked this pull request as ready for review June 19, 2024 05:28
Copy link
Collaborator

@bachuv bachuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this PR! Just left a couple of comments.

.github/workflows/validate-build-analyzer.yml Outdated Show resolved Hide resolved
.github/workflows/validate-build-e2e.yml Show resolved Hide resolved
@davidmrdavid davidmrdavid merged commit 779d56a into dev Jun 19, 2024
20 checks passed
@davidmrdavid davidmrdavid deleted the dajusto/run-tests-in-gh-action branch June 19, 2024 17:57
bachuv pushed a commit that referenced this pull request Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants